package myschool.test;

import myschool.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.sql.Connection;

/**
 * @author oldliu
 * @since 1.0
 */
public class DBPool {
    public static void main(String[] args) {

        for (int i = 0; i < 29; i++) {
            SqlSession session = MybatisUtil.get();
            Connection con = session.getConnection();
            System.out.println(con.hashCode());//hashcode相同，是同一个对象
            MybatisUtil.close(session);
        }

    }
}
